package com.audaque.springboot.foshanupload.web.openfeigndemo.controller;

import com.audaque.springboot.foshanupload.web.openfeigndemo.feign.api.FeignFeign;
import com.audaque.springboot.foshanupload.web.openfeigndemo.feign.api.FeignRibbonFeign;
import com.audaque.springboot.foshanupload.web.openfeigndemo.model.dto.FeignDto;
import com.audaque.springboot.foshanupload.web.openfeigndemo.model.req.FeignReq;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/feignRibbonTest")
public class FeignRibbonTestController {
    @Autowired
    private FeignRibbonFeign feignRibbonFeign;


    @GetMapping("/get1")
    public String get1() {
      return   feignRibbonFeign.get1();

    }

    @GetMapping("/get2/{param}")
    public String get2(@PathVariable("para") String param) {
        return feignRibbonFeign.get2(param);
    }

    @PostMapping("/post1")
    public FeignDto post1(@RequestBody FeignReq req) {
        return feignRibbonFeign.post1(req);

    }
}




